set SPAdminTool=%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe

@ECHO OFF
echo. Adil Baig's Tech Blog
echo. http://baigadil.blogspot.com
echo. baig.adil@gmail.com
echo.
echo --- Installing the RecentItemsSummary Solution.... ---
ECHO.
Assemblies\sleep.exe 1
echo --- Creating the required feature directory.... ---
ECHO.
Assemblies\sleep.exe 1
rd /s /q "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\Webparts.RecentItems"
mkdir "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\Webparts.RecentItems"

echo --- Making the Cabinet for RecentItemsSummary Solution.... ---
ECHO.
Assemblies\sleep.exe 3
set MakeCabTool=Assemblies\makecab.exe

"%MakeCabTool%" -f RecentItemsSummarySolution.ddf
ECHO.
ECHO.
echo --- Installing and Deploying the RecentItemsSummary Solution .... ---
ECHO.
Assemblies\sleep.exe 2
"%SPAdminTool%" -o addsolution -filename Package\RecentItemsSummary.wsp
"%SPAdminTool%" -o deploysolution -immediate -allowGacDeployment -name RecentItemsSummary.wsp -url %1 -force
"%SPAdminTool%" -o execadmsvcjobs
Assemblies\sleep.exe 2
ECHO.
echo --- Installing  the Feature.... ---
ECHO.
"%SPAdminTool%" -o installfeature -filename "CoolStuffs.Webparts.RecentItems\feature.xml" -force

ECHO.
pause
popd



